#ifndef MUTACURSOR_H
#define MUTACURSOR_H

#include <QGraphicsLineItem>
#include <QObject>
#include "MutaObject.h"

class MutaCursor : public QObject
{
    Q_OBJECT
public:
    MutaCursor(qreal x1,qreal y2);
    void setX(qreal x);
    qreal x();
    qreal y();
    void setPixels(qreal x);
    QPainterPath getCursorPath();
private:
    qreal millis;
    qreal ticks;
    qreal beats;
    qreal tempo;
    qreal pixels;
    int meterBeats;
    int meterLength;
    qreal pixelsPerTick;
    qreal ticksPerBeat;
    qreal millisPerBeat;
    qreal px;
    QGraphicsLineItem cursorPath;

signals:

public slots:
    void setTime(qreal delta);
    void reset();
    void setTempo(double tempo);
    void setMeterBeats(int meterBeats);
    void setMeterLength(int meterLength);
};

#endif // MUTACURSOR_H
